Part 1 - Project Based

• DOMAIN: Entertainment
• CONTEXT: Company X owns a movie application and repository which caters movie streaming to millions of users who on subscription basis. Company wants to automate the process of cast and crew information in each scene from a movie such that when a user pauses on the movie and clicks on cast information button, the app will show details of the actor in the scene. Company has an in-house computer vision and multimedia experts who need to detect faces from screen shots from the movie scene.
• DATA DESCRIPTION: The dataset comprises of images and its mask where there is a human face.
• PROJECT OBJECTIVE: Face detection from training images.
Steps and tasks:

  1. Import the dataset.

The file contains 409 images and labels. Let's view few images and their labels.

Viewing few random images and labels in the dataset

Creating features (images) and labels (mask)

Splitting the data into train and test sets

Visualizing X_train and y_train images

Creating a Mask Detection Model using U-net with MobileNet Transfer Learning Model

Designing Dice Coefficient and Loss function

Compliling the Model

Training the Model

Evaluating the Model

he model has precision and recall of 80.6% and 53.53% respectively. The loss is 43% and dice coefficient is 0.5663.

Predicting an image that was not used for training and testing the model

Viewing the predicted image and its face-detected output

Part 2 - Project Based


• DOMAIN: Face recognition
• CONTEXT: Company X intends to build a face identification model to recognise human faces.
• DATA DESCRIPTION: The dataset comprises of images and its mask where there is a human face.
• PROJECT OBJECTIVE: Face Aligned Face Dataset from Pinterest. This dataset contains 10,770 images for 100 people. All images are taken from 'Pinterest' and aligned using dlib library. Some data samples:
• TASK: In this problem, we use a pre-trained model trained on Face recognition to recognise similar faces. Here, we are particularly interested in recognising whether two given faces are of the same person or not. Below are the steps involved in the project.

Function to load images

Define function to load image

Load a sample image

VGG Face model

Load the model

Get vgg_face_descriptor

Generate embeddings for each image in the dataset

Generate embeddings for all images

Function to calculate distance between given 2 pairs of images.

Plot images and get distance between the pairs given below
2, 3 and 2, 180
30, 31 and 30, 100
70, 72 and 70, 115

Create train and test sets

  • Create X_train, X_test and y_train, y_test

  • Use train_idx to seperate out training features and labels

  • Use test_idx to seperate out testing features and labels

  • Encode the Labels

    Standardize the feature values

    Reduce dimensions using PCA

    Build a Classifier

    Test results

    Import the the test image. Display the image.